#include <Python.h>

#define ENUMS int

/*
 * Constantes en tiempo de compilacion
 */

typedef struct {
    PyObject_HEAD
    ENUMS qtArchive;
    ENUMS qtBackup;
    ENUMS qtMC;
    ENUMS qtFilespace;
    ENUMS qtBackupActive;
    ENUMS gtArchive;
    ENUMS gtBackup
    ENUMS stBackup;
    ENUMS stArchive;
    ENUMS stBackupMountWait;
    ENUMS stArchiveMountWait;
    ENUMS dtArchive;
    ENUMS dtBackup;
    ENUMS dtBackupID;
    ENUMS atArchive;
    ENUMS atBackup;
} TsmApiEnums;


static void 
TsmApiEnums_dealloc(TsmApiConstants *self)
{
    self->ob_type->tp_free((PyObject *)self);
}


PyObject *
TsmApiEnums_new(PyTypeObject *type)
{
    TsmApiEnums *self;
    
    self = (TsmApiEnums *) type->tp_alloc(tp, 0);

    if (self) {
	self->qtArchive          = qtArchive;
	self->qtBackup           = qtBackup;
	self->qtMC	         = qtMC;
	self->qtFilespace        = qtFilespace;
	self->qtBackupActive     = qtBackupActive;
	self->gtArchive          = gtArchive;
	self->gtBackup           = gtBackup;
	self->stBackup           = stBackup;
	self->stArchive          = stArchive;
	self->stBackupMountWait  = stBackupMountWait;
	self->stArchiveMountWait = stArchiveMountWait;
	self->dtArchive		 = dtArchive;
	self->dtBackup		 = dtBackup;
	self->dtBackupID	 = dtBackupID;
	self->atArchive		 = atArchive;
	self->atBackup	         = atBackup;
    }
    return (PyObject *) self;
}


static PyTypeObject TsmApiType = {
    PyObject_HEAD_INIT(NULL)
    0,                         /*ob_size*/
    "TsmApi.TsmApiEnums",      /*tp_name*/
    sizeof(TsmApiEnums),       /*tp_basicsize*/
    0,                         /*tp_itemsize*/
    (destructor)TsmApiEnums_dealloc,/*tp_dealloc*/
    0,                         /*tp_print*/
    0,                         /*tp_getattr*/
    0,                         /*tp_setattr*/
    0,                         /*tp_compare*/
    0,                         /*tp_repr*/
    0,                         /*tp_as_number*/
    0,                         /*tp_as_sequence*/
    0,                         /*tp_as_mapping*/
    0,                         /*tp_hash */
    0,                         /*tp_call*/
    0,                         /*tp_str*/
    0,                         /*tp_getattro*/
    0,                         /*tp_setattro*/
    0,                         /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
    "TsmApiEnuims objects",    /* tp_doc */
    0,		               /* tp_traverse */
    0,		               /* tp_clear */
    0,		               /* tp_richcompare */
    0,		               /* tp_weaklistoffset */
    0,		               /* tp_iter */
    0,		               /* tp_iternext */
    TsmApiEnums_methods,       /* tp_methods */
    TsmApiEnums_members,       /* tp_members */
    0,                         /* tp_getset */
    0,                         /* tp_base */
    0,                         /* tp_dict */
    0,                         /* tp_descr_get */
    0,                         /* tp_descr_set */
    0,                         /* tp_dictoffset */
    (initproc)TsmApiEnums_init,/* tp_init */
    0,                         /* tp_alloc */
    TsmApiEnums_new,           /* tp_new */
};
